<template>
  <hc-button type="primary" @click="open = true">Begin Tour</hc-button>

  <hc-divider />

  <hc-space>
    <hc-button id="btn1">Upload</hc-button>
    <hc-button id="btn2" type="primary">Save</hc-button>
    <hc-button ref="btnRef" :icon="MoreFilled" />
  </hc-space>

  <hc-tour v-model="open">
    <hc-tour-step
      target="#btn1"
      title="Upload File"
      description="Put you files here."
    />
    <hc-tour-step :target="el" title="Save" description="Save your changes" />
    <hc-tour-step
      :target="btnRef?.$el"
      title="Other Actions"
      description="Click to see other"
    />
  </hc-tour>
</template>

<script setup lang="ts">
import { ref } from 'vue'
import { MoreFilled } from '@hicor-ui/icons-vue'
import type { ButtonInstance } from 'hicor-ui'

const el = () => document.querySelector<HTMLElement>('#btn2')
const btnRef = ref<ButtonInstance>()

const open = ref(false)
</script>
